package com.itheima.juc23.question2;

/**
 * @author li
 * 有100份礼品，两人同时发送，当剩下的礼品小于10份的时候则不再送出
 * 利用多线程模拟该过程并将线程的名字和礼物的剩余数量打印出来
 */
public class Test {
    public static void main(String[] args) {
        MyRunnable runnable = new MyRunnable(100);
        Thread t1 = new Thread(runnable, "李四");
        Thread t2 = new Thread(runnable, "王五");
        t1.start();
        t2.start();
    }
}
